/* 弹窗样式 */
body {
  width: 400px;
  height: 500px;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #e6e6e6;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  background: linear-gradient(90deg, #4cc9f0, #4361ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.clear-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg, #f72585, #b5179e);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
}

.clear-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(247, 37, 133, 0.3);
}

.input-section {
  padding: 15px;
  display: flex;
  gap: 10px;
}

#textInput {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 30, 46, 0.7);
  color: #f0f0f0;
  font-size: 14px;
  resize: vertical;
  min-height: 60px;
}

#textInput:focus {
  outline: none;
  border-color: #4361ee;
  box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.3);
}

.save-btn {
  padding: 10px 15px;
  background: linear-gradient(135deg, #4361ee, #3a0ca3);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.4);
}

/* 测试按钮区域样式 */
.test-section {
  padding: 0 15px 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.test-btn {
  padding: 8px 12px;
  background: linear-gradient(135deg, #7209b7, #560bad);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 100px;
}

.test-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(114, 9, 183, 0.4);
}

/* 商品ID测试区域样式 */
.product-id-test-section {
  padding: 0 15px 15px;
}

.product-id-test {
  display: flex;
  gap: 10px;
  align-items: center;
}

.product-id-test input {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 30, 46, 0.7);
  color: #f0f0f0;
  font-size: 12px;
}

.product-id-test .test-btn {
  padding: 8px 12px;
  min-width: 80px;
  font-size: 12px;
}

/* 商品ID显示区域样式 */
.product-id-section {
  padding: 0 15px 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.product-id-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(30, 30, 46, 0.7);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.product-id-display .label {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
}

.product-id-display .value {
  font-size: 12px;
  color: #4cc9f0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 日志开关区域样式 */
.debug-section {
  padding: 0 15px 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
  padding-bottom: 15px;
}

.debug-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  gap: 10px;
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 40px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ccc;
  top: 2px;
  left: 2px;
  transition: all 0.3s ease;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
  background: linear-gradient(135deg, #06d6a0, #1b998b);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: white;
}

.status-on, .status-off {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.status-on {
  background: rgba(6, 214, 160, 0.2);
  color: #06d6a0;
}

.status-off {
  background: rgba(255, 255, 255, 0.1);
  color: #aaa;
}

.search-section {
  padding: 0 15px 15px;
}

#searchInput {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 30, 46, 0.7);
  color: #f0f0f0;
  font-size: 14px;
}

#searchInput:focus {
  outline: none;
  border-color: #4cc9f0;
  box-shadow: 0 0 0 2px rgba(76, 201, 240, 0.3);
}

.history-section {
  height: 160px;
  overflow-y: auto;
  padding: 0 15px;
}

.history-section::-webkit-scrollbar {
  width: 6px;
}

.history-section::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.history-section::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4361ee, #4cc9f0);
  border-radius: 3px;
}

.history-item {
  background: rgba(30, 30, 46, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.history-item:hover {
  transform: translateY(-2px);
  border-color: rgba(67, 97, 238, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background: rgba(40, 40, 60, 0.8);
}

.history-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(76, 201, 240, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.history-item:hover::before {
  transform: translateX(100%);
}

.item-content {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.action-btn {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn {
  background: linear-gradient(135deg, #06d6a0, #1b998b);
  color: white;
}

.copy-btn:hover {
  background: linear-gradient(135deg, #05c799, #188a7e);
  transform: scale(1.05);
}

.delete-btn {
  background: linear-gradient(135deg, #ef476f, #d90429);
  color: white;
}

.delete-btn:hover {
  background: linear-gradient(135deg, #e03e67, #c70325);
  transform: scale(1.05);
}

.empty-history {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.5);
}

.empty-history p {
  margin: 0;
  font-size: 14px;
}

/* 显示保存内容的模态框样式 */
#saved-content-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  background: rgba(30, 30, 46, 0.95);
  color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  min-width: 300px;
  max-width: 80%;
  max-height: 80%;
  overflow-y: auto;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#saved-content-modal h3 {
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center;
  color: #2ec4b6;
}

#saved-content-modal-content {
  margin-bottom: 20px;
  word-wrap: break-word;
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 4px;
  max-height: 300px;
  overflow-y: auto;
}

#saved-content-modal-close {
  display: block;
  margin: 0 auto;
  padding: 8px 16px;
  background: linear-gradient(135deg, #2ec4b6, #1a936f);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

#saved-content-modal-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(46, 196, 182, 0.4);
}

/* 粒子效果容器 */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}